# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=mpg123
pkgver=1.25.10
pkgrel=1
pkgdesc="A console based real time MPEG Audio Player for Layer 1, 2 and 3"
arch=('x86_64')
url="http://sourceforge.net/projects/mpg123"
license=('LGPL2.1')
depends=('libltdl' 'alsa-lib')
makedepends=('sdl' 'jack' 'libpulse')
optdepends=('sdl: for sdl audio support'
            'jack: for jack audio support'
            'libpulse: for pulse audio support')
source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2{,.sig})
sha256sums=('6c1337aee2e4bf993299851c70b7db11faec785303cfca3a5c3eb5f329ba7023'
            'SKIP')
validpgpkeys=('D021FF8ECF4BE09719D61A27231C4CBC60D5CAFE')

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr --enable-int-quality --with-module-suffix=.so \
    --with-audio="alsa oss sdl jack pulse"
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -m755 scripts/conplay "${pkgdir}/usr/bin/conplay"
}
